package com.easy.modules.sysmgr.web.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.easy.common.util.Const;
import com.easy.common.web.BaseController;
import com.easy.common.web.page.DataGrid;
import com.easy.common.web.page.Msg;
import com.easy.modules.sysmgr.service.GlobalServiceI;
import com.easy.modules.sysmgr.web.form.GlobalForm;

@Controller
@RequestMapping("/sysmgr/global")
public class GlobalAction extends BaseController {

	@Autowired
	private GlobalServiceI globalService ;
	
	@RequestMapping("/global_main.do")
	public String global_main(){
		return  Const.SYSMGR + "global_main" ;
	}
	
	@RequestMapping("/doNotNeedAuth_global_security_page.do")
	public String doNotNeedAuth_global_security(){
		return  Const.SYSMGR + "global_security_page" ;
	}
	
	@RequestMapping("/doNotNeedAuth_global_oa_page.do")
	public String doNotNeedAuth_global_oa_page(){
		return  Const.SYSMGR + "global_oa_page" ;
	}
	
	@RequestMapping("/doNotNeedAuth_global_ip_page.do")
	public String doNotNeedAuth_global_ip_page(){
		return  Const.SYSMGR + "global_ip_page" ;
	}
	
	@RequestMapping("/doNotNeedAuth_get.do")
	@ResponseBody
	public GlobalForm get(GlobalForm form){
		return this.globalService.get(form) ;
	}
	
	@RequestMapping("/doNotNeedAuth_add_edit.do")
	@ResponseBody
	public Msg add_edit(GlobalForm form){
		return this.globalService.saveORupdate(form) ;
	}
	
	@RequestMapping("/doNotNeedAuth_delete.do")
	@ResponseBody
	public Msg delete(GlobalForm form){
		return this.globalService.delete(form) ;
	}
	
	@RequestMapping("/doNotNeedAuth_datagrid.do")
	@ResponseBody
	public DataGrid datagrid(GlobalForm form){
		return this.globalService.datagrid(form) ;
	}
}
